create table Test (
total1_no number,
good char not null,
bad char not null,
day date,
constraint Test_pk primary key(total1_no)
)

create sequence total1_no_seq



insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'y','n',SYSDATE)
insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'y','n',SYSDATE)
insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'y','n',SYSDATE)
insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'y','n',SYSDATE)
insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'y','y',SYSDATE)
insert into Test(total1_no,good,bad,day) values(total1_no_seq.NEXTVAL,'n','n',SYSDATE)

-----------------------------------------------------------------------------------
create table TestHistory(
total2_no number ,
total number not null,
day date,
constraint TestHistory_pk primary key(total2_no)
)

create sequence total2_no_seq

insert into TestHistory(total2_no,total,day)values(total2_no_seq.NEXTVAL,200,SYSDATE)


--------------------------------------------
select * from Test
select * from TestHistory



drop table Test
drop table TestHistory

